<template>
  <div class="text">
        <h1  class="title">{{detaildata.title}}</h1>
        <div class="article-info"> 类型：纵火 时间：2019-6-18</div>
        <p class="content" >
            {{detaildata.content}}
        </p>
    </div>
</template>

<script>
export default {
    data:function(){
        return {
            detaildata:{
                title:"",
                content:""
            }
        }
    },
    created:async function(){
        let id = this.$route.query.id;
        console.log(id);
      let {data} = await  this.$http.get("/api/getdetail?id="+id);
    //   console.log(data);
    this.detaildata = data;
    }
}
</script>

<style scoped>
.text{
    width: 640px;
    margin: 0 auto;
}
.article-info{
    color:#999;
    font-size: 14px;
}
p{
    font-size: 16px;
    line-height: 30px;
}
</style>